﻿using MediatR;
using SY.BasicData.Api.Read.Applications.Cultivation.Command;
using SY.BasicData.Domain.Cultivation;
using SY.BasicData.ErrorCode;
using SY.BasicData.Infrastructures;

namespace SY.BasicData.Api.Read.Applications.Cultivation.CommandHandler
{
    public class CultivationDetailCommandHandler : IRequestHandler<CultivationDetailCommand, ApiResult<CultivationModel>>
    {
        private readonly IBaseRepository<CultivationModel> cultivationRepository;

        public CultivationDetailCommandHandler(IBaseRepository<CultivationModel> cultivationRepository)
        {
            this.cultivationRepository = cultivationRepository;
        }

        public Task<ApiResult<CultivationModel>> Handle(CultivationDetailCommand request, CancellationToken cancellationToken)
        {
            ApiResult<CultivationModel> result = new ApiResult<CultivationModel>();
            result.Code = ApiEnum.Success;
            result.Message = "养殖信息明细成功";
            return Task.FromResult(result);


        }
    }
}
